package com.ccp.dev.workflow.dao;

import com.ccp.dev.core.basic.base.IBaseMapper;
import com.ccp.dev.workflow.model.TaskApprovalItems;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * ClassDescribe
 * Author: fanruiqi
 * Date: 2019-09-09
 * Since:1
 * To change this template use File | Settings | File Templates.
 */
public interface TaskApprovalItemsDao extends IBaseMapper<TaskApprovalItems, String> {
    List<TaskApprovalItems> queryAll(String userId);

    @Override
    TaskApprovalItems getById(String itemId);

    List getByExpression(@Param("expression") String expression,@Param("itemId") String itemId);


    /**
     * 获取全局、流程定义、个人的常用语
     * @param modelKey 模型key
     * @param curUserId 当前用户
     * @return
     */
    List<TaskApprovalItems> queryByModelKeyAndUserAndSys(@Param("modelKey") String modelKey, @Param("curUserId") String curUserId);

    /**
     * 根据常用语分类查询
     * @param type 分类
     * @return
     */
    List<TaskApprovalItems> queryByType(Short type);

    /**
     * 根据modelKey查询
     * @param modelKey
     * @return
     */
    List<TaskApprovalItems> queryByModelKey(String modelKey);
}
